package cn.sxgan.common.entity;

import cn.sxgan.common.entity.sys.PageRequest;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description: 菜单权限表实体类
 * @Author: sxgan sxgan@foxmail.com
 * @Date: 2024-09-13
 * @Version: 1.0.0
 **/
@Data
@TableName(value = "sys_menu")
@Schema(name = "SysMenu", description = "菜单权限表实体类")
public class SysMenu extends PageRequest {
    /**
     * 菜单ID
     */
    @TableId
    @Schema(description = "菜单ID", type = "Long")
    private Long menuId;
    
    /**
     * 菜单名称
     */
    @Schema(description = "菜单名称", type = "String")
    private String menuName;
    
    /**
     * 父菜单ID
     */
    @Schema(description = "父菜单ID", type = "Long")
    private Long parentId;
    
    /**
     * 显示顺序
     */
    @Schema(description = "显示顺序", type = "Integer")
    private Integer orderNum;
    
    /**
     * 请求地址
     */
    @Schema(description = "请求地址", type = "String")
    private String url;
    
    /**
     * 打开方式（menuItem页签 menuBlank新窗口）
     */
    @Schema(description = "打开方式（menuItem页签 menuBlank新窗口）", type = "String")
    private String target;
    
    /**
     * 菜单类型（M目录 C菜单 F按钮）
     */
    @Schema(description = "菜单类型（M目录 C菜单 F按钮）", type = "String")
    private String menuType;
    
    /**
     * 菜单状态（0显示 1隐藏）
     */
    @Schema(description = "菜单状态（0显示 1隐藏）", type = "String")
    private String visible;
    
    /**
     * 是否刷新（0刷新 1不刷新）
     */
    @Schema(description = "是否刷新（0刷新 1不刷新）", type = "String")
    private String isRefresh;
    
    /**
     * 权限标识
     */
    @Schema(description = "权限标识", type = "String")
    private String perms;
    
    /**
     * 菜单图标
     */
    @Schema(description = "菜单图标", type = "String")
    private String icon;
    
    /**
     * 创建者
     */
    @Schema(description = "创建者", type = "String")
    private String createBy;
    
    /**
     * 创建时间
     */
    @Schema(description = "创建时间", type = "Date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    
    /**
     * 更新者
     */
    @Schema(description = "更新者", type = "String")
    private String updateBy;
    
    /**
     * 更新时间
     */
    @Schema(description = "更新时间", type = "Date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    
    /**
     * 备注
     */
    @Schema(description = "备注", type = "String")
    private String remark;
    
}